package com.nhc.database.dbmodel;

import org.greenrobot.greendao.annotation.Entity;
import org.greenrobot.greendao.annotation.Id;
import org.greenrobot.greendao.annotation.Transient;

import java.util.ArrayList;
import org.greenrobot.greendao.annotation.Generated;

/**
 * http://blog.csdn.net/njweiyukun/article/details/51893092
 * Created by wsf on 2017/5/16.
 */
@Entity
public class Route {

    @Id(autoincrement = true)
    private Long id;
    private String name = ""; //名称

    private long datetime = 0; //时间
    private String waypoint = ""; //航点 --最多300个？ - 分隔 标明航点顺序

    private String note = "";//备用 json

    @Transient
    public ArrayList<WayPoint> waypointList = new ArrayList<WayPoint>();

    @Transient
    public String strDate = "";//日期标签

    @Transient
    public static final int MAX_WAYPOINT = 300;

    @Generated(hash = 405472723)
    public Route(Long id, String name, long datetime, String waypoint,
            String note) {
        this.id = id;
        this.name = name;
        this.datetime = datetime;
        this.waypoint = waypoint;
        this.note = note;
    }

    @Generated(hash = 467763370)
    public Route() {
    }

    public Route(String name) {
        this.id = null;
        this.name = name;
        this.datetime = System.currentTimeMillis();;
    }

    public Long getId() {
        return this.id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return this.name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public long getDatetime() {
        return this.datetime;
    }

    public void setDatetime(long datetime) {
        this.datetime = datetime;
    }

    public String getWaypoint() {
        return this.waypoint;
    }

    public void setWaypoint(String waypoint) {
        this.waypoint = waypoint;
    }

    public String getNote() {
        return this.note;
    }

    public void setNote(String note) {
        this.note = note;
    }


}
